// noinspection NpmUsedModulesInstalled,JSUnusedGlobalSymbols

import request from '@/utils/request'

export default {

  // 1 获取全部图片
  getAllImage() {
    return request({
      url: '/itservice/imageadmin/getAllImage',
      method: 'get'
    })
  },

  // 2 修改
  updateImage(image) {
    return request({
      url: '/itservice/imageadmin/updateImage',
      method: 'post',
      data: image
    })
  },

  // 3 添加
  addImage(image) {
    return request({
      url: '/itservice/imageadmin/addImage',
      method: 'post',
      data: image
    })
  },

  // 4 删除
  removeImageById(id) {
    return request({
      url: `/itservice/imageadmin/removeImageById/${id}`,
      method: 'delete'
    })
  },

  // 5 分页查看
  getPageImage(page, limit) {
    return request({
      url: `/itservice/imageadmin/pageImage/${page}/${limit}`,
      method: 'get'
    })
  },

  //6 根据id查看image信息
  getImageInfoById(imageId) {
    return request({
      url: `/itservice/imageadmin/getImageById/${imageId}`,
      method: 'get'
    })
  },

  //7 更改图片状态
  changeState(imageId) {
    return request({
      url: `/itservice/imageadmin/changeState/${imageId}`,
      method: 'get'
    })
  },

  //8 一键更改图片状态
  batchChangeImageState(state) {
    return request({
      url: `/itservice/imageadmin/batchChangeImageState/${state}`,
      method: 'get'
    })
  }
}
